package com.memo4android.ui;

import com.memo4android.TodoItem;
import com.memo4android.model.ItemTodoList;
import com.memo4android.model.Todo;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnLongClickListener;

public class TodoLongClickedListener implements OnLongClickListener{
	private Todo mtodo;
	private ItemTodoList Tdl;
	private Context context;
	private Activity activity;
	
	public TodoLongClickedListener(Context context, Todo todo, ItemTodoList Itdl){
		this.mtodo = todo;
		this.Tdl = Itdl;
		this.context = context;
		this.activity = (Activity) context;
	}
	
	@Override
	public boolean onLongClick(View v) {
		Intent intent = new Intent(context, TodoItem.class);
		intent.putExtra("todoName", mtodo.getTitre());
		intent.putExtra("folderName", Tdl.getTitre());
		activity.startActivity(intent);
		return true;
	}
}